﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ITS.Core.Domain.Users;

namespace ITS.DAL.Users
{
    public interface IUserAccountRepository
    {
        IQueryable<User> Users { get; }
        User UserByID(Guid ID);
        User UserByUsername(string email);
        IQueryable<Role> Roles { get; }
        User GetByUsername(string username);
        bool HasRole(Guid UserID, Guid RoleID);
        Role RoleByID(Guid ID);
        void Save(User user);
        void UpdateUser(User user);
        void SaveUserExtended(UserExtended userExtended);
        void UpdateUserExtended(UserExtended userExtended);
        User Get(Guid ID);
        bool IsExisting(string username);

        User Authenticate(string email, string nonencryptedpass);

        void Delete(User User);
    }
}
